| Total Complexity | 3 |
| Total Lines | 19 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | /* |
||
| 27 | export default class SpecialCharactersEmoji extends Plugin { |
||
| 28 | |||
| 29 | init() { |
||
| 30 | const editor = this.editor; |
||
| 31 | const specialCharsPlugin = editor.plugins.get('SpecialCharacters'); |
||
| 32 | |||
| 33 | specialCharsPlugin.addItems('Emoji', this.getEmojis()); |
||
| 34 | } |
||
| 35 | |||
| 36 | getEmojis() { |
||
| 37 | //Map our emoji data to the format the plugin expects |
||
| 38 | return emoji.map(emoji => { |
||
| 39 | return { |
||
| 40 | title: emoji.name, |
||
| 41 | character: emoji.char |
||
| 42 | }; |
||
| 43 | }); |
||
| 44 | } |
||
| 45 | } |